import cv2 as cv


def main():
    img = cv.imread('../data/test.png')
    if img is None:
        print("牛爷爷, 俺滴图图呢")
        return

    blue, green, red = cv.split(img)

    cv.imshow("Press any key to next", blue)
    cv.waitKey(0)

    cv.imshow("Press any key to next", green)
    cv.waitKey(0)

    cv.imshow("Press any key to next", red)
    cv.waitKey(0)

    mergeImg = cv.merge((blue, green, red))
    cv.imshow("Press any key to next", mergeImg)
    cv.waitKey(0)

    cv.destroyAllWindows()


if __name__ == "__main__":
    main()
